import { ApiProperty } from "@nestjs/swagger";
import { IsNumberString, IsOptional, IsString, Length } from "class-validator";

export class OnlineListDto {
    @ApiProperty({ required: false })
    @IsNumberString()
    page: number;

    @ApiProperty({ required: false })
    @IsNumberString()
    size: number;

    @ApiProperty({
        required: false,
    })
    @IsOptional()
    @IsString()
    @Length(0, 128)
    ipaddr?: string;

    @ApiProperty({
        required: false,
    })
    @IsOptional()
    @IsString()
    @Length(0, 50)
    userName?: string;
}
